package org.linlinjava.litemall.db.models;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

@Getter
@Setter
public class BaseModel extends Model {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField(value = "add_time", fill = FieldFill.INSERT)
    private LocalDateTime addTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, update = "now()")
    private LocalDateTime updateTime;

    @TableLogic
    @TableField("deleted")
    private Boolean deleted;
}
